package com.ruoyi.house_sale.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.house_sale.mapper.SaleActiveMapper;
import com.ruoyi.house_sale.domain.SaleActive;
import com.ruoyi.house_sale.service.ISaleActiveService;

/**
 * 营销活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-08
 */
@Service
public class SaleActiveServiceImpl implements ISaleActiveService 
{
    @Autowired
    private SaleActiveMapper saleActiveMapper;

    /**
     * 查询营销活动
     * 
     * @param activeid 营销活动主键
     * @return 营销活动
     */
    @Override
    public SaleActive selectSaleActiveByActiveid(Long activeid)
    {
        return saleActiveMapper.selectSaleActiveByActiveid(activeid);
    }

    /**
     * 查询营销活动列表
     * 
     * @param saleActive 营销活动
     * @return 营销活动
     */
    @Override
    public List<SaleActive> selectSaleActiveList(SaleActive saleActive)
    {
        return saleActiveMapper.selectSaleActiveList(saleActive);
    }

    /**
     * 新增营销活动
     * 
     * @param saleActive 营销活动
     * @return 结果
     */
    @Override
    public int insertSaleActive(SaleActive saleActive)
    {
        return saleActiveMapper.insertSaleActive(saleActive);
    }

    /**
     * 修改营销活动
     * 
     * @param saleActive 营销活动
     * @return 结果
     */
    @Override
    public int updateSaleActive(SaleActive saleActive)
    {
        return saleActiveMapper.updateSaleActive(saleActive);
    }

    /**
     * 批量删除营销活动
     * 
     * @param activeids 需要删除的营销活动主键
     * @return 结果
     */
    @Override
    public int deleteSaleActiveByActiveids(Long[] activeids)
    {
        return saleActiveMapper.deleteSaleActiveByActiveids(activeids);
    }

    /**
     * 删除营销活动信息
     * 
     * @param activeid 营销活动主键
     * @return 结果
     */
    @Override
    public int deleteSaleActiveByActiveid(Long activeid)
    {
        return saleActiveMapper.deleteSaleActiveByActiveid(activeid);
    }
}
